<?php 
  header("Content-type: text/html; charset=utf-8");
  require_once('inc_jiaju.php');
  connect();
  $sql = "select * from category";
  $list = fetch_array($sql);
  //var_dump($cat_list);
 ?>
<!DOCTYPE html>
<html>
<head>
  <title>添加家具</title>
</head>
<body>
<form method="POST" action="doadd.php" enctype="multipart/form-data">
<table align="center" border="1">
<center><h2>添加家具</h2></center>
<tr>
  <th>家具名称</th>
  <td><input type="text" name="ctf_name"></td>
</tr>
<tr>
  <th>所属类别</th>
  <td>
    <select name="ctf_cid">
      <option>==请选择==</option>
      <!-- <option value="1">熊猫</option> -->
      <?php
        foreach($list as $one)
        {
          echo '<option value="'.$one['ctf_cid'].'">'.$one['ctf_cname'].'</option>';
        }
      ?>
    </select>
  </td>
</tr>
<tr>
  <th>家具品牌</th>
  <td><input type="text" name="ctf_brand"></td>
</tr>
<tr>
  <th>上传照片</th>
  <td><input type="file" name="ctf_jiajulink"></td>
</tr>
<tr>
  <th>照片介绍</th>
  <td><textarea name="ctf_intro" rows="5"></textarea></td>
</tr>
<tr>
  <th>添加时间</th>
  <td><input type="date" name="ctf_adddate"></td>
</tr>
<tr>
  <td></td>
  <td>
  <input type="submit" value="添加">
  <input type="reset" value="重置">
  </td>
</tr>
</form>

  
</table>
</body>
</html>